//
//  BaseTableViewCell.m
//  CarUser
//
//  Created by 王森林 on 2018/12/4.
//  Copyright © 2018年 王森林. All rights reserved.
//

#import "BaseTableViewCell.h"


@interface BaseTableViewCell()
@property (nonatomic, strong) UILabel *separatorLine;
@end

@implementation BaseTableViewCell


//- (instancetype)initWithData:(id)data
//{
//    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
//        [self createUI];
//    }
//    return self;
//    
//}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
       [self createUI];
    }
    return self;
}

//- (void)prepareForReuse
//{
//    [super prepareForReuse];
//    while ([self.contentView.subviews lastObject] != nil)
//    {
//        [(UIView*)[self.contentView.subviews lastObject] removeFromSuperview];
//    }
//    
//}

- (void)createUI
{
    
}

-(void)createUIWithData
{
    
}

- (void)setData:(id)data
{
    
    
    
}

- (void)showSeparatorWithY:(float)y
{
    [self.contentView  addSubview:self.separatorLine];
    self.separatorLine.frame = CGRectMake(0, y, BOUNDWIDTH, 0.5);
    
}

- (void)hideSeparator
{
    [self.separatorLine removeFromSuperview];
    self.separatorLine = nil;
    
}

- (UILabel *)separatorLine
{
    if (!_separatorLine) {
        _separatorLine = [UILabel new];
        _separatorLine.backgroundColor = Common_SepeColor;
    }
    return _separatorLine;
}

@end
